home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / archiver / unix / unz50p1.zoo / VMS / VMS.notes < prev    next >
Text File  |  1992-05-24  |  14KB  |  310 lines

  1.                      VMS Notes for UnZip 5.0
  2.                            24 May 1992
  3.  
  4.  
  5. The various VMS tweaks to UnZip 5.0 and ZipInfo 0.97 were tested on a 
  6. VAX 8600 running VMS 5.2 (and, later, VMS 5.4) and VAX C 3.0.  Older 
  7. versions were also tested on a VAX 11/785.
  8.  
  9. To build UnZip (and its trusty sidekick, ZipInfo), just run one of the 
  10. included command files MAKE_UNZIP_VAXC.COM or MAKE_UNZIP_GCC.COM, either
  11. decryption or non-decryption versions, depending on whether you have the
  12. separate crypt.c module and whether you use VAX C or GNU C (for example, 
  13. "@make_unzip_vaxc").  By default, this creates shareable-image executables,
  14. which are smaller and (supposedly) load faster than the normal type.  They 
  15. also (supposedly) will be better able to take advantage of any bug fixes 
  16. or new capabilities that DEC might introduce, since the library code isn't 
  17. built into the executable.  The shared executable is about a quarter the 
  18. size of the ordinary type in the case of UnZip.
  19.  
  20. [Btw, the VMS make utility "MMS" is not compatible enough with Unix make 
  21. to use the same makefile.  Antonio Querubin, Jr., sent along an MMS makefile,
  22. subsequently modified by Igor Mandrichenko.  Read the comments at the top 
  23. of DESCRIP.MMS for more info.  An alternate Unix-like makefile designed for 
  24. use with Todd Aven's MAKE/VMS is included, as well.  Comments on where to
  25. get MAKE/VMS are at the bottom of VMS Contents.]
  26.  
  27. UnZip is written to return the standard PK-type return codes (or error
  28. codes, or exit codes, or whatever you want to call them).  Unfortunately,
  29. VMS insists on interpreting the codes in its own lovable way, and this
  30. results in endearing commentary such as "access violation, error mask =
  31. 0005, PC = 00003afc" (or something like that) when you run UnZip with no
  32. arguments.  To avoid this I've added a special VMS_return() function which
  33. either ignores the error codes (and exits with normal status) or interprets
  34. them, prints a semi-informative message (enclosed in square [] brackets), 
  35. and then exits with a normal error status.  I personally can't stand the 
  36. latter behavior, so by default the error codes are simply ignored.  Tastes
  37. vary, however, and some people may actually like semi-informative messages.
  38. If you happen to be one of those people, you may enable the messages by 
  39. recompiling misc.c with RETURN_CODES defined.  (This adds a block or two
  40. to the executable size, though.)  The syntax is as follows:
  41.     cc /def=(RETURN_CODES) misc
  42.  
  43. To use UnZip in the normal way, define a symbol "unzip" as follows:
  44.     unzip :== "$diskname:[directory]unzip.exe"
  45. (substitute for "diskname" and "directory" as appropriate, and DON'T FORGET
  46. THE `$'!  It won't work if you omit that.)  In general it's wise to stick 
  47. such assignments in your LOGIN.COM file and THEN forget about them.  It is 
  48. no longer necessary to worry about the record type of the zipfile...er, 
  49. well, most of the time, anyway (see the Kermit section below).
  50.  
  51. Having done all this you are ready to roll.  Use the unzip command in
  52. the usual way; as with the Unix, OS/2 and MS-DOS versions, this one uses 
  53. '-' as a switch character.  If nothing much happens when you do a directory
  54. listing, for example, you're probably trying to specify a filename which
  55. has uppercase letters in it...VMS thoughtfully converts everything on the
  56. command line to lowercase, so even if you type:
  57.     unzip -v zipfile Makefile
  58. what you get is:
  59.     unzip -v zipfile makefile
  60. which, in my example here, doesn't match the contents of the zipfile.
  61. This is relatively easy to circumvent by enclosing the filespec(s) in 
  62. quotes:
  63.     unzip -tq unzip401 "Makefile" "VMS*" *.c *.h
  64. [This example also demonstrates the use of wildcards, which act like Unix
  65. wildcards, not VMS ones.   In other words, "VMS*" matches files VMSNOTES,
  66. VMS_MAKE.COM, and VMSSHARE.OPT, whereas the normal VMS behavior would be
  67. to match only the first file (since the others have extensions--ordinarily,
  68. you would be required to specify "VMS*.*").]
  69.  
  70. Note that created files get whatever default permissions you've set, but 
  71. created directories additionally inherit the (possibly more restrictive) 
  72. permissions of the parent directory.  And, of course, things probably won't 
  73. work too well if you don't have permission to write to whatever directory 
  74. into which you're trying to extract things.  (That made sense; read it 
  75. again if you don't believe me.)
  76.  
  77. ZipInfo, by the way, is an amusing little utility which tells you all sorts
  78. of amazingly useless information about zipfiles.  Occasionally it's useful
  79. to debug a problem with a corrupted zipfile (for example, we used it to 
  80. find a bug in PAK-created zipfiles, versions 2.5 and earlier).  Feel free
  81. to blow it away if you don't need it.  It's about 30 blocks on my system,
  82. and I find I actually prefer its listing format to that of UnZip now (hardly
  83. surprising, since I wrote it :-) ).  I also find it useful to use "ii" 
  84. rather than "zipinfo" as the symbol for zipinfo, since it's easier to type 
  85. than either "zipinfo" or "unzip -v", and it echoes the common Unix alias 
  86. "ll" for the similar style of directory listings.  Oh, and the reason it's 
  87. still got a beta version number is that I haven't finished it yet--it would 
  88. be better with an automatic paging function, for example.  Oh well.
  89.  
  90. RANDOM OTHER NOTES:  (1) Igor Mandrichenko (leader of our fearless Russian 
  91. contingent) rewrote major portions of the VMS file-handling code, with
  92. the result that UnZip is much smarter now about VMS file formats.  For
  93. full VMS compatibility (file attributes, ownership info, etc.), be sure
  94. to use the -X option of Zip 1.6 and later.  There are also some notes
  95. at the end of this file from Hugh Schmidt and Mike Freeman which give 
  96. hints on how to save VMS attributes using Zip 1.0 and UnZip 4.1.  Most of
  97. the information is still valid, but the -X option is much easier if you
  98. don't have to transfer the zipfiles to a Unix or PC system.  (2) Zip 1.0 
  99. cannot handle any zipfile that isn't in stream-LF format, so you may need 
  100. to use Rahul Dhesi's BILF utility which is included with UnZip.  It will
  101. also be necessary for certain other special occasions, like when you've 
  102. forgotten to set the correct Kermit parameters while uploading a zipfile 
  103. (see Hugh Schmidt's note below for comments about Kermit, too).
  104.  
  105. Greg Roelofs
  106.  
  107. ====================
  108.  
  109. From INFO-ZIP Digest (Wed, 6 Nov 1991), Volume 91, Issue 290
  110.  
  111.                 VMS attributes and PKZIP compatibility
  112.                   VMS attributes restored! (2 msgs)
  113.  
  114. ------------------------------
  115.  
  116. Date: Tue, 5 Nov 91 15:31 CDT
  117. From: Hugh Schmidt <HUGH@macc.wisc.edu>
  118. Subject: VMS attributes and PKZIP compatibility
  119. Message-ID: <21110515313938@vms.macc.wisc.edu>
  120.  
  121.            ******************************************************
  122. (1)        *** Retaining VMS attributes - a proposed strategy ***
  123.            ******************************************************
  124.  
  125. This is a proposed strategy for recovering VMS file attributes after
  126. zip/unzip:
  127.  
  128. a) capture VMS file attributes: VMS ANALYZE/RMS/FDL/OUTPUT=fdlfile vmsfile.ext
  129. b) compress files on VMS......: ZIP zipfile vmsfile.ext, fdlfile.fdl
  130. c) uncompress files on VMS....: UNZIP zipfile vmsfile.ext, fdlfile.fdl
  131. d) recover VMS file attributes: CONVERT/FDL=fdlfile.fdl vmsfile.ext vmsfile.ext
  132.  
  133. The wrinkle is that UNZIP creates files which are unreadable by CONVERT
  134. despite a concerted effort to accomodate VMS file management system:
  135.  
  136. file_io.c, line 178: ...creat(filename,0, "rat=cr", "rfm=streamlf")
  137.  
  138. These files are unCONVERTABLE because they appear to VMS to contain
  139. records with 512+ bytes.  Poring over VMS manuals (Programming V-6A, VAX
  140. C RTL Reference Manual) doesn't readily suggest better alternatives.
  141. Experimentation with "rat=fix", etc. may help suppress the spurious
  142. block-end delimeters.
  143.  
  144.           ****************************************************
  145. (2)       *** VMS ZIP and PKZIP compatibility using KERMIT ***
  146.           ****************************************************
  147.  
  148. Many use Procomm's kermit to transfer zipped files between PC and VMS
  149. VAX.  The following VMS kermit settings make VMS-ZIP compatible with
  150. PKZIP:
  151.  
  152.                                              VMS kermit      Procomm kermit
  153.